package com.zeny.express.framework.core.service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;

import com.zeny.express.framework.config.ConfigurationService;

/**
 * 基础服务类
 * 
 * @author zhuwei
 * @date 2013年8月15日 上午11:52:45
 */
public abstract class BaseService {

	/**
	 * 统一日志
	 */
	protected final Logger LOGGER = LoggerFactory.getLogger(getClass());

	/**
	 * 国际化消息
	 */
	@Autowired
	protected MessageSource messageSource;
	
	/**
	 * 参数配置
	 */
	@Autowired
	protected ConfigurationService configurationService;

	@PostConstruct
	public void init() {
		LOGGER.debug("Initialize service bean: " + getClass());
	}

	@PreDestroy
	public void destroy() {
		LOGGER.debug("Destroy service bean: " + getClass());
	}
	
}
